Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • correct to use*svy brr syntax with bootstrap weights and svy bootstrap syntax with brr weights?*

    Dear Statalisters,

    Is it correct to use the svy brr syntax with bootstrap weights and svy bootstrap syntax with brr weights? This 2006 post states that it is possible, but not whether it is correct.
    https://www.stata.com/statalist/arch.../msg00734.html

    This simple demonstration based on the Stata help files shows that the two methods yield identical standard errors up to 24 decimal places. But since there are separate syntax statements for the two methods, I wonder if there are instances where they would yield different results for the same data.
    Code:
    . use http://www.stata-press.com/data/r15/nhanes2brr
    
    . svyset [pweight = finalwgt], brrweight(brr_1-brr_32) vce(brr)
    
          pweight: finalwgt
              VCE: brr
              MSE: off
        brrweight: brr_1 .. brr_32
      Single unit: missing
         Strata 1: <one>
             SU 1: <observations>
            FPC 1: <zero>
    
    . svy, nodots: mean height
    
    Survey: Mean estimation         Number of obs   =       10,351
                                    Population size =  117,157,513
                                    Replications    =           32
                                    Design df       =           31
    
    --------------------------------------------------------------
                 |                 BRR
                 |       Mean   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
          height |   168.4599     .14663      168.1608    168.7589
    --------------------------------------------------------------
    
    . display %36.24f _se[height]
    0.146629979913073582586946
    
    . 
    . svyset [pweight = finalwgt], bsrweight(brr_1-brr_32) vce(bootstrap)
    
          pweight: finalwgt
              VCE: bootstrap
              MSE: off
        bsrweight: brr_1 .. brr_32
      Single unit: missing
         Strata 1: <one>
             SU 1: <observations>
            FPC 1: <zero>
    
    . svy, nodots: mean height
    
    Survey: Mean estimation         Number of obs   =       10,351
                                    Population size =  117,157,513
                                    Replications    =           32
    
    --------------------------------------------------------------
                 |   Observed   Bootstrap         Normal-based
                 |       Mean   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
          height |   168.4599     .14663      168.1725    168.7473
    --------------------------------------------------------------
    
    . display %36.24f _se[height]
    0.146629979913073582586946
    
    . 
    . **********************************************************************
    . 
    . use http://www.stata-press.com/data/r15/nmihs_bs, clear
    
    . svyset [pweight = finwgt], brrweight(bsrw1-bsrw1000) vce(brr)
    
          pweight: finwgt
              VCE: brr
              MSE: off
        brrweight: bsrw1 .. bsrw1000
      Single unit: missing
         Strata 1: <one>
             SU 1: <observations>
            FPC 1: <zero>
    
    . svy, nodots: mean birthwgt
    
    Survey: Mean estimation           Number of obs   =      9,946
                                      Population size =  3,895,562
                                      Replications    =      1,000
                                      Design df       =        999
    
    --------------------------------------------------------------
                 |                 BRR
                 |       Mean   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
        birthwgt |   3355.452   6.520637      3342.657    3368.248
    --------------------------------------------------------------
    
    . display %36.24f _se[birthwgt]
    6.520636700651118999871869
    
    
    . svyset [pweight = finwgt], bsrweight(bsrw1-bsrw1000) vce(bootstrap)
    
          pweight: finwgt
              VCE: bootstrap
              MSE: off
        bsrweight: bsrw1 .. bsrw1000
      Single unit: missing
         Strata 1: <one>
             SU 1: <observations>
            FPC 1: <zero>
    
    . svy, nodots: mean birthwgt
    
    Survey: Mean estimation           Number of obs   =      9,946
                                      Population size =  3,895,562
                                      Replications    =      1,000
    
    --------------------------------------------------------------
                 |   Observed   Bootstrap         Normal-based
                 |       Mean   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
        birthwgt |   3355.452   6.520637      3342.672    3368.233
    --------------------------------------------------------------
    
    . display %36.24f _se[birthwgt]
    6.520636700651118999871869
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

  • #2
    I cannot comment on the correctness for it, but a small difference that emerged for me was that, with some small samples (<200), the vce(bootstrap) model will crash while the vce(brr) model will produce an estimate. But any time both are able to run to completion, they produce the same answers.

    Comment


    • #3
      Hi David,

      I know I'm late to the party with this one, but I had a similar question that was answered recently by a Statistics Can employee:

      "It seems for the excerpts of code below that you are using STATA for your analysis. The old syntax that you were using was based on a method to trick BRR (balanced repeated replication) into doing the right thing with bootstrap weights. I think this is the method described in Appendix 2 of the attached 2014 Research Data Centre technical document written by Christian Gagné, Georgia Roberts & Leslie-Anne Keown.

      It seems that newer versions of STATA are able to handle bootstrap weights more straightforwardly, and this is what the second example of syntax below does. Nevertheless, the old methodology should still work, so that’s why you’re getting the same results from both. The code is implementing the same estimation methodology in both cases. Older versions of STATA had to be tricked into using bootstrap replicate weights correctly; nevertheless, they did give a correct result."


      It seems one was meant to be a workaround for a defunct limitation of Stata.

      Cheers,

      David.

      Comment


      • #4
        Thank you, David Speed. I asked this question when I was working on a methodology report for a survey that uses bootstrap weights but gave instructions using Stata's BRR syntax. While I don't know why the author chose that approach, in retrospect it seems like it was a good idea because (a) it yields a correct outcome and (b) it is compatible with both newer and older version of Stata.
        David Radwin
        Senior Researcher, California Competes
        californiacompetes.org
        Pronouns: He/Him

        Comment

        Working...
        X